{% if paginator.num_pages > 1 %}
    <div class="row justify-content-center align-items-center mt-3 mb-n3">
        <nav aria-label="Page navigation example">
            <ul class="pagination justify-content-center">
            {% if page_obj.has_previous %}
                <li class="page-item">
                    <a class="page-link" href="?page={{ page_obj.previous_page_number }}">&larr;</a>
                </li>
            {% endif %}
            {% for item in page_obj.paginator.page_range %}
                <li class="page-item {% if item == page_obj.number %}active{% endif %}">
                    <a class="page-link" href="?page={{ item }}">{{ item }}</a>
                </li>
            {% endfor %}
            {% if page_obj.has_next %}
                <li class="page-item">
                    <a class="page-link" href="?page={{ page_obj.next_page_number }}">&rarr;</a>
                </li>
            {% endif %}
            </ul>
        </nav>
    </div>
{% endif %}
